const n = require("../../utils/request");
const i = require("../../utils/api");
Page({
    data: {
        docDetail: {}
    },

    onLoad: function(options) {
        const docId = options.id;
        // 假设我们有一个方法来获取文档详情
        this.getDocDetail(docId);
    },

    getDocDetail: function(id) {
        let that = this;
        n.request(n.HttpMethod.POST, "https://shop2.zrs360.vip//api/wechat/Home/getDocDetail?id="+id,{}).then(function(e) {
            if(e.code == 1){
                e.data.content = e.data.content.replace(/\<img/g,'<img style="width:100%;height:auto;display:block"');
                that.setData({
                    docDetail:  e.data
                });
            }else {
                wx.showToast({
                    title:e.msg,
                    icon:'none',
                    duration:2000
                })
            }
        })



    }
});